STEP 9: Remember, the data type of roll_2 is an integer. We need to cast it to a string.

  • Go to LOGIC, click on and drag in Convert to String. Drop it at the bottom of your program.
  • Change the variable inside of str() from my_var to roll_2.
  • Change the variable to the left of the = from my_var to roll_2_string.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)